package learnFactoryPattern;


import pizzaTypes.ChicagoStyleCheesePizza;
import pizzaTypes.ChicagoStyleGreekPizza;
import pizzaTypes.ChicagoStylePepperoniPizza;
import pizzaTypes.ChicagoStyleVeggiePizza;
import pizzaTypes.Pizza;

public class ChicagoPizzaStore extends PizzaStore {
	@Override
	Pizza createPizza(String type) {
		Pizza pizza = null;
		if(type.equals("cheese")) {
			pizza = new ChicagoStyleCheesePizza();//芝加哥风：厚面皮，多乳酪
		}else if(type.equals("greek")) {
			pizza = new ChicagoStyleGreekPizza();
		}else if(type.equals("pepperoni")) {
			pizza = new ChicagoStylePepperoniPizza();
		}else if(type.equals("veggie")) {
			pizza = new ChicagoStyleVeggiePizza();
		}
		return pizza;
	}

}
